class Persion(object):

    def __init__(self, name, age):
        self._name = name
        self._age = age

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

    def play(self, game):
        print("%s 正在玩 %s" %(self._name, game))


## 继承Person 类
class Student(Persion):
    def __init__(self, name, age, title):
        super().__init__(name, age)
        self._title = title

    @property
    def title(self):
        return self._title

    @title.setter
    def title(self, title):
        self._title = title

    def study(self, course):
        print("%s 正在学习 %s" %(self._name, course))

    def play(self, game):
        print("%s 子类正在玩 %s" % (self._name, game))

if __name__ == '__main__':
    student = Student("tuanzhang", 18, "111")
    student.study("python")
    student.play("文明6")

    print(student.title)
